<template>
  <div class="loginPageSty">
    <div class="name">户邦后台管理系统</div>
    <div class="formSty">
      <div class="iptItem marginTop">
        <img src="@/assets/img/user.png" class="imgSty" />
        <input placeholder="请输入用户名" v-model="form.name" class="iptSty" />
      </div>
      <div class="iptItem">
        <img src="@/assets/img/password.png" class="imgSty" />
        <input placeholder="请输入密码" type="password" v-model="form.password" class="iptSty" />
      </div>
      <el-button class="btnSty" @click="goLogin">登录</el-button>

    </div>
  </div>
</template>
<script lang="ts" setup>
import { reactive } from "vue";
import router from "../router";
import { loginApi } from '@/api/index'
import { useStore } from "@/pinia/index";
const store = useStore();

const form = reactive({
  name: "admin",
  password: "security123",
});

function goLogin() {
  router.push({ path: "/" });
}
</script>

<style scoped>
.loginPageSty {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  flex-direction: column;
  width: 100vw;
  height: 100vh;
  background: url("@/assets/img/login.png") 100% / cover no-repeat;
}

.name {
  font-size: 54px;
  color: #fff;
  margin-top: 154px;
  text-align: center;
  width: 578px;
  height: 110px;
  background: url("@/assets/img/name_bg.png") 100% / cover no-repeat;
}

.formSty {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  flex-direction: column;
  width: 716px;
  height: 654px;
  padding-top: 80px;
  background: url("@/assets/img/form_bg.png") 100% / cover no-repeat;
}

.iptItem {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  width: 374px;
  height: 64px;
  border: 1px solid #ccc;
  border-radius: 5px;
  background-color: rgba(0, 0, 0, 0.1);
  margin-bottom: 50px;
}

.imgSty {
  width: 32px;
  margin: 0 10px;
}

.iptSty {
  background-color: rgba(0, 0, 0, 0.1);
  border: none;
  color: #fff;
}

.iptSty:focus {
  outline: none;
}

.btnSty {
  width: 374px;
  height: 64px;
  background-color: #07d2e4;
  border: none;
  color: #fff;
  font-size: 28px;
  margin-top: 10px;
}

.forgetSty {
  font-size: 21px;
  color: #0adfef;
  margin-top: 20px;
}

.marginTop {
  margin-top: 6px;
}
</style>
